package cn.com.xxlibrary.service.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import cn.com.xxlibrary.dao.IBookDao;
import cn.com.xxlibrary.orm.BooksBean;
import cn.com.xxlibrary.service.IBookService;

@Service
@Repository("bookService")
public class BookServiceImpl implements IBookService {

	@Resource
	private IBookDao bookDao;
	
	public BooksBean queryBook(int id){
		return bookDao.queryBook(id);
	}
	
	public void addBook(BooksBean book){
		bookDao.addBook(book);
	}
	
	public void delBook(int id){
		bookDao.delBook(id);
	}
	
	public Map listBook(int start, int pageSize){
		return bookDao.listBook(start, pageSize);
	}
	
}
